Skip to content

telemetry: LiveKit product statistics for agents and plugins - #8768

Merged
theomonnom merged 7 commits into
v2.0from
theo/productstats
Nov 24, 2026
Merged

theomonnom merged 7 commits into
v2.0from
theo/productstats

Conversation

@theomonnom

Copy link
Copy Markdown
Member

No description provided.

Runner::detect derives production, development, ci or unknown from the
launching command, the platform and the CI and LK_HOSTED_AGENTS variables.
The launcher records the parsed command; a job process receives its
worker's in the IPC hello. The product statistics opt-out
(LIVEKIT_PRODUCT_STATS=0, DO_NOT_TRACK=1) is read once beside it.
abi::productstats declares the resource (lk.productstats.*), the provider,
job, crash, stall and drop instruments, and the plugin host function. The
telemetry codegen refuses a product statistics declaration with content,
free text or an lk.pii.* key.
lk_agents_net::export::productstats aggregates the shared recorder's
measurements with delta temporality and posts them once a minute, gzipped
OTLP/HTTP protobuf, to /productstats/agents/v0/metrics on the Cloud host.
A non-Cloud URL sends nothing; a window without a credential is held, one
at a time; drops are counted and exported next. Its destination and
failures are separate from the customer observability exporter.
LLM and TTS requests at their trace's end (requests, retries, failures by
class, TTFT/TTFB, duration), STT where its attempts are retried or given
up, realtime sessions' retries, reconnects and failures, fallbacks when a
chain launches on another entry, end-of-turn, VAD, STT and realtime
latencies from their metrics records, event-loop stalls by frame names,
job starts and outcomes, and job processes that died. Servers and live
jobs configure the export's Cloud credential.
Plugin.register_plugin reports each plugin, and telemetry installation
passes the Python version. Regenerated bindings, stubs and registry.
@theomonnom
theomonnom requested a review from a team as a code owner November 24, 2026 23:35
@theomonnom
theomonnom merged commit 9730a37 into v2.0 Nov 24, 2026
9 of 15 checks passed
@theomonnom
theomonnom deleted the theo/productstats branch November 24, 2026 23:36

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

6 flags not posted on this PR by your GitHub settings β€” view them in Devin Review. (Configure)

Devin Review

Comment on lines +41 to +46
pub fn cloud(livekit_url: &str, api_key: &str, api_secret: &str) -> Option<Self> {
if api_key.is_empty() || api_secret.is_empty() {
return None;
}
let base_url = crate::strings::observability_url(livekit_url, None)?;
Some(Destination { base_url, api_key: api_key.into(), api_secret: api_secret.into() })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŸ₯ Project bearer sent outside LiveKit Cloud

A compromised worker endpoint can steer Destination::cloud through the assigned room URL. The Cloud hostname check and HTTP client interpret URL separators differently. The resulting request can disclose a project observability-write bearer to a non-LiveKit host.

Devin Review


Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant